package com.russell.pms.exception;

import com.russell.pms.ExceptionCode;

/**
 * 
 * @author <a href=mailto:fvinluan@gmail.com>Francis Vinluan</a>
 * @version $Revision: 1.0 $
 */
public class PMSException extends RuntimeException {

    /**
     * 
     */
    private static final long serialVersionUID = 8621216058281380111L;
    private ExceptionCode code;

    /**
     * 
     * @param code
     */
    public PMSException(ExceptionCode code) {
        super(code.getDescription());
        this.code = code;
    }

    /**
     * 
     * @param code
     * @param cause
     */
    public PMSException(ExceptionCode code, Throwable cause) {
        super(code.getDescription(), cause);
        this.code = code;
    }

    /**
     * 
     * @param cause
     */
    public PMSException(Throwable cause) {
        super(cause);
    }

    public ExceptionCode getCode() {
        return code;
    }

}
